package com_djm_2025_05_15;

/**
 * @author dengjiangming
 * @version 1.1.0
 * @date    2025-05-15
 */
public class Demo5 {

    public static int count = 0;

    public static int fiboni(int n){
        if(n == 1 || n == 2){
            count++;
            return 1;
        }

        return fiboni(n - 1) + fiboni(n - 2);
    }

    public static void main(String[] args) {
        //求斐波那契序列的第七项
        System.out.println(fiboni(7));
        System.out.println(Demo5.count);
    }
}
